const { Schema, model } = require("mongoose");

const questionSchema = new Schema({
    __v: {
        type: Number,
        select: false,
    },
    title: {
        type: String,
        required: true,
    },
    description: {
        type: String,
        required: true,
    },
    topic: {
        type: Schema.Types.ObjectId,
        ref: "Topic",
        required: true,
    },
    questioner: {
        type: Schema.Types.ObjectId,
        ref: "User",
        required: true,
        select: false,
    },
});

module.exports = model("Question", questionSchema);
